<HTML><HEAD><TITLE>union_var(?SetVariable, ?UnionVar)</TITLE>
</HEAD><BODY>[ <A HREF="index.html">library(cardinal)</A> | <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]
<H1>union_var(?SetVariable, ?UnionVar)</H1>
Union of a set of sets
<DL>
<DT><EM>SetVariable</EM></DT>
<DD>A Set (variable or ground) of sets.
</DD>
<DT><EM>UnionVar</EM></DT>
<DD>A Set (variable or ground).
</DD>
</DL>
<H2>Description</H2>
UnionVar is the union of sets in SetVariable. If UnionVar is given
		(as a ground set or a set variable), then SetVariable is constrained to have such union.
		If UnionVar is a free variable, then it is unified with the set's union as
		a set variable or a ground set (if it is already known).<P>
		union_var/2 can thus be used either to declare (or constrain) a union
		function or to retrieve it.
<H3>Fail Conditions</H3>
Fails if UnionVar can not be the union of SetVariable.
<H3>Resatisfiable</H3>
No.
<H2>Examples</H2>
<PRE>
?- S `::[]..[[a],[b]], union_var(S,U).
?- S `::[]..[[a],[b],[a,b]], union_var(S,[a,b]).
?- union_var([[a,b],[b,c]], U).
U = [a,b,c]</PRE>
<H2>See Also</H2>
<A HREF="../../lib_public/cardinal/set-4.html">set / 4</A>, <A HREF="../../lib_public/cardinal/sets-4.html">sets / 4</A>, <A HREF="../../lib_public/cardinal/cardinality-2.html">cardinality / 2</A>
</BODY></HTML>
